import java.util.HashSet;
import java.util.Iterator;

class User {
    String name;
    String key;
    public User(String name, String key) {
        this.name = name;
        this.key = key;
    }

    @Override
    public String toString() {
        return "{ 用户名："+" 密码："+key+"}";
    }

    @Override
    public boolean equals(Object obj) {
        return super.equals(obj);
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }
}
public class PTA_6_83 {
    public static void main(String[] args) {
        HashSet<User> set = new HashSet<User>();
        set.add(new User("Tom","11111"));
        set.add(new User("Jerry","22222"));
        set.add(new User("Jerry","22222"));
        set.add(new User("Marry","33333"));
        Iterator<User> it=set.iterator();
        for(;it.hasNext();)
            System.out.println(it.next());
    }
}
